package com.szholly.pro.watergas_server.ps.data;

import java.util.HashMap;

import com.szholly.data.general.metadata.table.DefulatDomainTable;import org.springframework.stereotype.Component;import com.szholly.data.general.Field;import com.szholly.data.general.InterceptorTableBase;import com.szholly.data.general.metadata.IBaseTable;import com.szholly.utils.spring.SpringBeanFactory;import org.springframework.stereotype.Component;import com.szholly.data.general.GlobalDataType;import com.szholly.data.general.RowBase;
/**
 * OperationMaterialReplace
 */
@Component("OperationMaterialReplace")
public class OperationMaterialReplaceTable extends InterceptorTableBase  implements IBaseTable{

	public final static String TABLE_NAME = "OP_MATE_REPLACE";
	
	/**
	 * single ref
	 */
	public static OperationMaterialReplaceTable getSingleRef() {
		return (OperationMaterialReplaceTable) SpringBeanFactory.getBean("OperationMaterialReplace");
	}

	@Override
	public String getMetadataTableName() {
		return TABLE_NAME;
	}

	@Override
	public String getMetadataTableAliasName() {
		return "OperationMaterialReplace";
	}

	private HashMap<String, Field> fields;

	@Override
	protected HashMap<String, Field> fields() {
		if (fields == null) {
			fields = new HashMap<String, Field>();

			Field itemField = new Field();
			itemField.setFieldName(RowBase.FIELD_GUID);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(1);
			itemField.setFieldAliasName("GUID");
			itemField.setAllowNull(true);
			itemField.setCanShow(false);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			
			
			itemField = new Field();
			itemField.setFieldName(OperationMaterialReplaceRow.FIELD_DeviceType);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(5);
			itemField.setFieldAliasName("DEVICE_TYPE");
			itemField.setAllowNull(true);
			itemField.setCanShow(false);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationMaterialReplaceRow.FIELD_WwtpId);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(6);
			itemField.setFieldAliasName("WWTP_ID");
			itemField.setAllowNull(true);
			itemField.setCanShow(false);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			
			
			itemField = new Field();
			itemField.setFieldName(OperationMaterialReplaceRow.FIELD_DeviceName);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(8);
			itemField.setFieldAliasName("DEVICE_NAME");
			itemField.setAllowNull(true);
			itemField.setCanShow(false);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationMaterialReplaceRow.FIELD_ReplacePerson);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(9);
			itemField.setFieldAliasName("REPLACE_PERSON");
			itemField.setAllowNull(true);
			itemField.setCanShow(false);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationMaterialReplaceRow.FIELD_StationId);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(10);
			itemField.setFieldAliasName("STATION_ID");
			itemField.setAllowNull(true);
			itemField.setCanShow(false);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationMaterialReplaceRow.FIELD_ReplaceDate);
			itemField.setDataType(GlobalDataType.DateTime);
			itemField.setFieldID(11);
			itemField.setFieldAliasName("REPLACE_DATE");
			itemField.setAllowNull(true);
			itemField.setCanShow(false);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationMaterialReplaceRow.FIELD_MaterialType);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(12);
			itemField.setFieldAliasName("MATERIAL_TYPE");
			itemField.setAllowNull(true);
			itemField.setCanShow(false);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationMaterialReplaceRow.FIELD_DeviceNumber);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(13);
			itemField.setFieldAliasName("DEVICE_NUMBER");
			itemField.setAllowNull(true);
			itemField.setCanShow(false);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationMaterialReplaceRow.FIELD_MaterialQuantity);
			itemField.setDataType(GlobalDataType.Int32);
			itemField.setFieldID(14);
			itemField.setFieldAliasName("MATERIAL_QUANTITY");
			itemField.setAllowNull(true);
			itemField.setCanShow(false);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationMaterialReplaceRow.FIELD_MaterialName);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(15);
			itemField.setFieldAliasName("MATERIAL_NAME");
			itemField.setAllowNull(true);
			itemField.setCanShow(false);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationMaterialReplaceRow.FIELD_ReplaceResult);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(16);
			itemField.setFieldAliasName("REPLACE_RESULT");
			itemField.setAllowNull(true);
			itemField.setCanShow(false);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationMaterialReplaceRow.FIELD_Remark);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(17);
			itemField.setFieldAliasName("REMARK");
			itemField.setAllowNull(true);
			itemField.setCanShow(false);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationMaterialReplaceRow.FIELD_TaskId);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(18);
			itemField.setFieldAliasName("TASK_ID");
			itemField.setAllowNull(true);
			itemField.setCanShow(false);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationMaterialReplaceRow.FIELD_MaterialUnit);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(19);
			itemField.setFieldAliasName("MATERIAL_UNIT");
			itemField.setAllowNull(true);
			itemField.setCanShow(false);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
		}
		return fields;
	}

	@Override
	public String getTableGroup() {
		return "OperationMaterialReplace";
	}
}